package bit_poi;

import bit_poi.service.StudentAbsenceService;
import cn.hutool.core.lang.Console;

import java.io.IOException;
import java.util.Scanner;

/**
 * @author yuisama
 * @date 2023/01/04 18:48
 * 程序入口
 **/
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Console.log("请输入查询时间 : ");
        String queryTime = scanner.nextLine();
        long start = System.nanoTime();
        StudentAbsenceService absenceService = new StudentAbsenceService();
        // 获取学生信息表格，查询缺勤学生并输出表格
        absenceService.queryStudentAbsencesAndPrint(queryTime);
        long end = System.nanoTime();
        // count used time
        Console.log("执行任务结束,共耗时 : " + (end - start) / 1000000.0 + "ms");
        // 关闭连接
        absenceService.closeSession();
        try {
            // 暂停打包为exe闪退的问题
            System.in.read();
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
